package main

import "fmt"

func main() {
	//if else：条件中的变量只能在
	println("if else的使用：")
	distance := CalculateDistance(1000, 5000)
	println(distance)
}

func CalculateDistance(start int32, end int32) string {
	distance := end - start
	feels := ""
	if distance < 100 {
		feels = fmt.Sprintf("distance=%d, 这么长的距离并不远", distance)
	} else if distance >= 100 {
		feels = fmt.Sprintf("distance=%d, 这么长的距离挺远的", distance)
	}
	return feels
}
